#include"shm.cc"
int main()
{
    shm server(SERVER);
    server.server_get();
    char* messages=(char*)server.virtual_address();
    std::cout << messages << std::endl;
    while(1)
    {
       // std::cout << messages << std::endl;
        sleep(1);
       // sleep(1);
      //  if((*messages)!=0)
      //  {
            cout<<"Server received message:"<<(*messages)<<endl;
        //    //messages++;
       // }
      //  else
      //  {
      //      std::cout << (*messages) << std::endl;
      //  }
    }
    cout<<"Server exit"<<endl;
    return 0;
}